import { ElLoading } from "element-plus";

let loading;
function openLoading() {
  if (loading) {// 防止重复加载
    loading.close();
  }
  loading = ElLoading.service({
    lock: true,
    text: "加载中...",
    background: "rgba(0, 0, 0, 0.7)",
  });

}
function closeLoading() {
  loading.close();
}
export { openLoading, closeLoading };
